#ifndef GS_ILIBRARY_H
#define GS_ILIBRARY_H

#include "Config.h"
#include "IReferenced.h"
#include "IValue.h"

namespace Gs
{
	// Represents a GorillaScript object.
	class GS_EXPIMP IObject
	{
	public:
		// Removes the specified field (resolving to nil).
		virtual void RemoveField(IString *name) = 0;

		// Sets the specified field to an integer value.
		virtual void SetField(IString *name, int i) = 0;

		// Sets the specified field to a float value.
		virtual void SetField(IString *name, float f) = 0;

		// Sets the specified field to a string value.
		virtual void SetField(IString *name, IContext *context, const char *s) = 0;

		// Sets the specified field to a string value.
		virtual void SetField(IString *name, IString *s) = 0;

		// Sets the specified field to an object.
		virtual void SetField(IString *name, IObject *o) = 0;

		// Sets the specified field to a native function.
		virtual void SetField(IString *name, NativeFunction f) = 0;

		// Sets the specified field to a user pointer.
		virtual void SetField(IString *name, UserPointer ptr) = 0;

		// Gets the value at the named key.
		virtual IValue *GetField(IString *name) const = 0;
	};
}

#endif
